import java.util.HashMap;

public class Main {
    public static void main(String[] args) { 
        // 创建一个空的哈希映射
        HashMap<Integer, String> map = new HashMap<Integer, String>();
        
        // 添加元素到map中
        map.put(1, "apple");
        map.put(2, "banana");
        map.put(3, "orange");
        
        System.out.println(map); // 输出: {1=apple, 2=banana, 3=orange}
    }
}[^1]

for (Integer key : map.keySet()) {
    System.out.println("Key: " + key + ", Value: " + map.get(key));
}[^1]
